package com.example.bjsfpost.sap;

import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.Data;

import java.io.Serializable;

@Data
public class SapCommonResponseDO<T> implements Serializable {
    private String code;
    private String msg;
    private T data;
    public static SapCommonResponseDO ok(Object data){
        SapCommonResponseDO responseDO = new SapCommonResponseDO();
        responseDO.setCode("200");
        responseDO.setMsg("success");
        responseDO.setData(data);
        return responseDO;
    }
    public static SapCommonResponseDO fail(Object data){
        SapCommonResponseDO responseDO = new SapCommonResponseDO();
        responseDO.setCode("500");
        responseDO.setMsg("fail");
        responseDO.setData(data);
        return responseDO;
    }
}
